/*
 * @Description: 
 * @Author: charles
 * @Date: 2021-10-25 09:31:01
 * @LastEditors: charles
 * @LastEditTime: 2021-10-25 09:38:38
 */
import {get} from '../../utils/request'
export default {
  namespaced:true,
  state: {
    user_info:{}
  },
  mutations: {
    SET_INFO(state,playload){
      state.user_info = playload;
    }
  },
  actions: {
    async loadUser({commit}){
      let url = "/user/info"
      let token = localStorage.getItem('token')
      let resp = await get(url,{token})
      commit('SET_INFO',resp.data)
    }
  }
}
